<?php 
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');
?> 

<script language="javascript" type="text/javascript" src="<?php echo JS_PATH;?>commoncheck.js"></script>
<body onload="groupcheck()">
<div class="txt_head_frame">
	<span class="txt_frame_title">组员增加</span>
</div>
<div id="main_content">
<form name="myform" action="?m=admin&c=groupmanage&a=group_add" method="post" id="myform">
<input type="hidden" name="info[userid]" value="<?php echo $userid;?>"></input>
<div class="txt_content_frame">
	<div class="txt_content_box">
		<div class="txt_content_left">
			<div class="txt_text_left">组长:</div>
			<div class="txt_left_input"><?php echo $realname;?></div><br/><br/>
           
            <div class="txt_text_left">组员登陆号:<span>[*]</span></div>
			<div class="txt_left_input"><input name="info[crewname]" type="text" class="txt" id="crewname"/></div><span id="validatecrewname" class="validate"></span><br/><br/>          
		</div>
	</div>
</div>

<div class="txt_btn">
	<input name="dosubmit" type="submit" class="txt_btn_a" value=" 保存 " />
</div>
</form>
</div>
</body>
<script type="text/javascript">
<!--
//组员增加检查
function groupcheck(){
	$('#crewname').blur(function(){
		var validatecrewname = $('#validatecrewname');
		validatecrewname.html('<img src="images/onLoad.gif" width=16 heigth=16>检测中');	
		$.ajax({
			type:'get',
			url:'',
			data:'m=admin&c=groupmanage&a=public_crew_ajx&crewname='+this.value,
			success : function(data){
				if(data == "0"){									
					validatecrewname.html('<img src="images/false.gif" width=16 heigth=16>不能增加该组员');		
				}else {	
					validatecrewname.html('<img src="images/true.gif" width=16 heigth=16>');		
				}
			}
		});
	});
}
//-->
</script>
</html>